import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/views/Login'
import Index from '@/views/Index'

import Homepage from '@/views/Homepage'
import Home from '@/views/Home'
import Kitchen from '@/views/Kitchen'
import Community from '@/views/Community'
import City from '@/views/City'
import My from '@/views/My'

import Bake from '@/views/Bake'

import Register from '@/views/Register'
import Sort from '@/views/Sort'
import Caipu from '@/views/caipu'
import Yangsheng from '@/views/yangsheng'

Vue.use(Router)

export default new Router({
  routes:[
		{
			path:'/',
			name:'index',
			redirect:'/login',
			component:Index,
			children:[   
						{
						path:'/',
						redirect:'/login'
					},
						{
						path:'/login',
						name:'login',
						component:Login
					},
					{
						path:'/register',
						name:'register',
						component:Register
					}
			]
		},
		{
			path:'/homepage',
			name:'Homepage',
			component:Homepage,
			children:[
				{
					path:'/home',
					name:'Home',
					component:Home
					
				},
				{
					path:'/kitchen',
					name:'Kitchen',
					component:Kitchen
					
				},
				{
					path:'/community',
					name:'Community',
					component:Community
					
				},
				{
					path:'/city',
					name:'City',
					component:City
					
				},
				{
					path:'/my',
					name:'My',
					component:My	
				}
			]
		},
	
		{
			path:'/sort',
			name:'sort',
			redirect:'/caipu',
			component:Sort,
			children:[
				{
					path:'/caipu',
					name:'caipu',
					component:Caipu,
				},
				{
					path:'/yangsheng',
					name:'yangsheng',
					component:Yangsheng,
				},
			]
		},
	{
      path:'/bake',
      name:'Bake',
      component:Bake
    },
    {
      path:'/soup',
      name:'Soup',
      component:()=>import('@/views/Soup')
    },
    {
      path:'/vegan',
      name:'Vegan',
      component:()=>import('@/views/Vegan')
    },
    {
      path:'/jiazuo',
      name:'Jiazuo',
      component:()=>import('@/views/Jiazuo')
    },
    {
      path:'/meony',
      name:'Meony',
      component:()=>import('@/views/Meony')
    },
    {
      path:'/eat',
      name:'Eat',
      component:()=>import('@/views/Eat')
    },
		
	
	]
})
